Optimal. Leaf size=127 \[ -\frac{a (4-n) (a \sec (c+d x)+a)^{n-1} \text{Hypergeometric2F1}\left (1,n-1,n,\frac{1}{2} (\sec (c+d x)+1)\right )}{4 d (1-n)}+\frac{a (a \sec (c+d x)+a)^{n-1} \text{Hypergeometric2F1}(1,n-1,n,\sec (c+d x)+1)}{d (1-n)}+\frac{a (a \sec (c+d x)+a)^{n-1}}{2 d (1-\sec (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.109211, antiderivative size = 127, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {3880, 103, 156, 65, 68} \[ -\frac{a (4-n) (a \sec (c+d x)+a)^{n-1} \, _2F_1\left (1,n-1;n;\frac{1}{2} (\sec (c+d x)+1)\right )}{4 d (1-n)}+\frac{a (a \sec (c+d x)+a)^{n-1} \, _2F_1(1,n-1;n;\sec (c+d x)+1)}{d (1-n)}+\frac{a (a \sec (c+d x)+a)^{n-1}}{2 d (1-\sec (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3880
Rule 103
Rule 156
Rule 65
Rule 68
Rubi steps
\begin{align*} \int \cot ^3(c+d x) (a+a \sec (c+d x))^n \, dx &=\frac{a^4 \operatorname{Subst}\left (\int \frac{(a+a x)^{-2+n}}{x (-a+a x)^2} \, dx,x,\sec (c+d x)\right )}{d}\\ &=\frac{a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}-\frac{a \operatorname{Subst}\left (\int \frac{(a+a x)^{-2+n} \left (2 a^2+a^2 (2-n) x\right )}{x (-a+a x)} \, dx,x,\sec (c+d x)\right )}{2 d}\\ &=\frac{a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}+\frac{a^2 \operatorname{Subst}\left (\int \frac{(a+a x)^{-2+n}}{x} \, dx,x,\sec (c+d x)\right )}{d}-\frac{\left (a^3 (4-n)\right ) \operatorname{Subst}\left (\int \frac{(a+a x)^{-2+n}}{-a+a x} \, dx,x,\sec (c+d x)\right )}{2 d}\\ &=-\frac{a (4-n) \, _2F_1\left (1,-1+n;n;\frac{1}{2} (1+\sec (c+d x))\right ) (a+a \sec (c+d x))^{-1+n}}{4 d (1-n)}+\frac{a \, _2F_1(1,-1+n;n;1+\sec (c+d x)) (a+a \sec (c+d x))^{-1+n}}{d (1-n)}+\frac{a (a+a \sec (c+d x))^{-1+n}}{2 d (1-\sec (c+d x))}\\ \end{align*}
Mathematica [A] time = 0.216217, size = 96, normalized size = 0.76 \[ -\frac{a (a (\sec (c+d x)+1))^{n-1} \left ((n-4) (\sec (c+d x)-1) \text{Hypergeometric2F1}\left (1,n-1,n,\frac{1}{2} (\sec (c+d x)+1)\right )+4 (\sec (c+d x)-1) \text{Hypergeometric2F1}(1,n-1,n,\sec (c+d x)+1)+2 n-2\right )}{4 d (n-1) (\sec (c+d x)-1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.23, size = 0, normalized size = 0. \begin{align*} \int \left ( \cot \left ( dx+c \right ) \right ) ^{3} \left ( a+a\sec \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]